package fei.yuzhi.com.loveflowers.utils;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.GridView;

import java.util.List;

/**
 * Created by My on 2016/10/8.
 */
public class ClickWay {
    public static void getClick(GridView gridView, final Context context,
                                final Class classes, final List<String> mData){
        gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                Intent intent=new Intent(context,classes);
                intent.putExtra("data",mData.get(position));
                context.startActivity(intent);
            }
        });
    }

}
